# Gcc vector benchmark
# Julien Etienne, 2008
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

env = Environment()
env.Append(CPPDEFINES=[('VECTOR_TYPE','int'), ('VECTOR_SIZE',4), ('NB_PROFILING_LOOP',100000000)])
env.Append(CCFLAGS='-Wall')

NoGccDebugEnv=env.Clone()
NoGccDebugEnv.Append(CCFLAGS='-g')
NoGccDebugObjects = NoGccDebugEnv.Object('vector_nogcc_debug','main.cpp')
NoGccDebugEnv.Program('vector_nogcc_debug', NoGccDebugObjects)

NoGccOptimizedEnv=env.Clone()
NoGccOptimizedEnv.Append(CCFLAGS='-O3')
NoGccOptimizedObjects = NoGccOptimizedEnv.Object('vector_nogcc_optimized','main.cpp')
NoGccOptimizedEnv.Program('vector_nogcc_optimized', NoGccOptimizedObjects)

GccDebugEnv=env.Clone()
GccDebugEnv.Append(CPPDEFINES=['USE_GCC_VECTOR'], CCFLAGS='-g')
GccDebugObjects = GccDebugEnv.Object('vector_gcc_debug','main.cpp')
GccDebugEnv.Program('vector_gcc_debug', GccDebugObjects)

GccOptimizedEnv=env.Clone()
GccOptimizedEnv.Append(CPPDEFINES=['USE_GCC_VECTOR'], CCFLAGS='-O3')
GccOptimizedObjects = GccOptimizedEnv.Object('vector_gcc_optimized','main.cpp')
GccOptimizedEnv.Program('vector_gcc_optimized', GccOptimizedObjects)


